<template>
  <div>
    <div class="animation-box">{{num}}</div>
   <button class="btn">+1</button>
  </div>
 

</template>

<script>
  export default {
    name: 'search',
    props:['model'],
    data(){
      return{
        num:0
      }
    }
  }
</script>

<style scoped>

.btn{
  display: block;
  margin: auto;
  margin-top: 20px;
}
.animation-box{
  margin: auto;
  width: 100px;
  height:100px;
  display: flex;
  justify-content: center;
  align-items:center;
  animation: example 10s infinite;
  animation-delay:1s;
  animation-timing-function:linear;
  animation-fill-mode: both;
}

.animation-box:hover{
  animation-play-state:paused;
}

/* 动画代码 */
@keyframes example {
  0% {background-color: black;
      border: 40px solid transparent; }

  50%{
        background-color: white;
        border: 40px solid black;
  }

  100% {background-color: black;
        border: 40px solid transparent; }
}


</style>